package org.wangchaocheng.cloudgallery.commond.user;

import com.alibaba.cola.dto.Command;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.wangchaocheng.cloudgallery.commond.validate.ValidateUpdateGroup;

/**
 * 角色保存cmd
 *
 * @author wangchaocheng
 * @date 2025/04/07
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class RoleSaveCmd extends Command {

    /**
     * 角色ID
     */
    @NotNull(message = "角色ID不可为空", groups = ValidateUpdateGroup.class)
    private Integer id;

    /**
     * 角色名称
     */
    @NotBlank(message = "角色名称不可为空")
    private String roleName;

    /**
     * 角色标识(如ROLE_ADMIN)
     */
    @NotBlank(message = "角色标识不可为空")
    private String identifier;

    /**
     * 角色描述
     */
    @NotBlank(message = "角色描述不可为空")
    private String description;

    /**
     * 状态
     * @see org.wangchaocheng.cloudgallery.enums.user.RoleStatusEnum
     */
    @NotBlank(message = "状态不可为空", groups = ValidateUpdateGroup.class)
    private String status;

}
